#include <stdio.h>

int main() {
    int cm;
    scanf("%d", &cm);

    double meters = cm / 100.0;
    double feet = meters / 0.3048;
    int foot = (int)feet;
    double inch = (feet - foot) * 12;

    printf("%d %d\n", foot, (int)inch);

    return 0;
}